export const restTime = (futureTime) => {
  let nowTime = new Date().getTime()
  if (nowTime > futureTime) return
  let restTimeStamp = futureTime - nowTime

  let day = parseInt(restTimeStamp / (24 * 60 * 60 * 1000))
  let hour = parseInt(restTimeStamp / (60 * 60 * 1000) % 24)
  let min = parseInt(restTimeStamp / (60 * 1000) % 60)
  let sec = parseInt(restTimeStamp / 1000 % 60)

  return '剩余' + day + '天' + hour + '时' + min + '分' + sec + '秒'
}